package com.df.ez_game.server.gateway.controler;

import com.df.ez_game.business.annotation.EzController;
import com.df.ez_game.business.annotation.EzMapping;
import com.df.ez_game.server.EzGameConstance;
import com.df.ez_game.server.gateway.UserManager;

//controller id 0给系统内部使用,消息id 1~999给网关 1000~1999给broker 2000~2999给逻辑服  用户自定义的话从3000开始到65535
@EzController(name = "gateway",id= EzGameConstance.InnerControllerCode)
public class GatewayController {
    @EzMapping(id=1,desc = "获取登录后的数量")
    public int getOnlineCount(){
        return UserManager.getLoginedCount();
    }

    @EzMapping(id=2,desc = "获取连接的数量，瞬时的")
    public int getConnectCount(){
        return UserManager.getConnectCount();
    }
}
